/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package worker;

import book.PhoneBookItem;

/**1
 *
 * @author x3m
 */
public class Collector  {
    
    public static IPhoneWorker worker = new Worker_db();
    
    public static PhoneBookItem[] getAll(){
        return worker.getItems();
    }
    
    public static PhoneBookItem getItem(String id){
        return worker.getItem(id);
    }    
    
    public static Boolean editItem(PhoneBookItem item){
        return worker.editItem(item);
    }

    public static Boolean addItem(PhoneBookItem item){
        return worker.addItem(item);
    }
    
    public static void generateUsers(int count){
        worker.generateUsers(count);
    }
    
    public static void deleteItems(String [] names){
        for (int i = 0; i < names.length; i++) {
            worker.deleteItem(names[i]);
        }
    }
}
